package com.carstop.model;

import java.text.DateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.json.JSONArray;

import com.member.model.MemberVO;

public class CarStopFindStopJsonHandler {

	
	public CarStopFindStopJsonHandler() {
		super();
	}

	public JSONArray toJSONArray(List<CarStopVO> carstopList) {
		ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();
		for (CarStopVO carstop : carstopList) {
			HashMap map = new HashMap();
			
			String stop_id=carstop.getStop_id();			
			String name=carstop.getName();
			map.put("stop_id", stop_id);	
			map.put("name", name);
			list.add(map);		
			
		}
		JSONArray stopJson = new JSONArray(list);
		return stopJson;
	}

	
	
	
	
	
	
	
	
}
